<template>
  <basic-container>
    <CommonDict :name="name" :option="option"></CommonDict>
  </basic-container>
</template>

<script>
    import CommonDict from "../common/CommonDict";
    export default {
        name:'generalDict',
        data() {
            return {
                name:'generalDict',
                option: {
                    tip: false,
                    tree: true,
                    border: true,
                    index: true,
                    selection: true,
                    viewBtn: true,
                    columnBtn:false,
                    column: [
                        {
                            label: "字典编号",
                            prop: "evalue",
                            span: 24,
                            search: true,
                            rules: [{
                                required: true,
                                message: "请输入字典编号",
                                trigger: "blur"
                            }]
                        },
                        {
                            label: "字典名称",
                            prop: "dictKey",
                            search: true,
                            rules: [{
                                required: true,
                                message: "请输入字典名称",
                                trigger: "blur"
                            }]
                        },
                        {
                            label: "上级字典",
                            prop: "parentid",
                            type: "tree",
                            dicData: [],
                            hide: true,
                            props: {
                                label: "dictKey",
                                value:'id'
                            },
                            rules: [{
                                required: false,
                                message: "请选择上级字典",
                                trigger: "click"
                            }]
                        },
                        // {
                        //     label: "字典英文名",
                        //     prop: "evalue",
                        //     search: true,
                        //     span: 24,
                        //     rules: [{
                        //         required: true,
                        //         message: "请输入英文名",
                        //         trigger: "blur"
                        //     }]
                        // },
                        {
                            label: "字典键值",
                            prop: "dictValue",
                            type: "number",
                        },
                        {
                            label: "字典排序",
                            prop: "sortid",
                            type: "number",
                        }
                    ]
                },
            };
        },

        components:{
            CommonDict
        }
    };
</script>

<style>
</style>
